home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 722 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  29 lines

  1. Newsgroups: comp.lang.c
  2. Path: news.sprintlink.net!eskimo!scs
  3. From: scs@eskimo.com (Steve Summit)
  4. Subject: Re: mixing enums and integers
  5. X-Nntp-Posting-Host: eskimo.com
  6. Message-ID: <DKvv4n.Jzw@eskimo.com>
  7. Sender: news@eskimo.com (News User Id)
  8. Organization: only when absolutely necessary
  9. References: <4cij6k$dvb@yrkpa.kias.com> <DKtpIL.72z@eskimo.com> <4cq3v7$q3m@newshost.lanl.gov>
  10. Date: Mon, 8 Jan 1996 22:14:47 GMT
  11.  
  12. In article <4cq3v7$q3m@newshost.lanl.gov>, tanmoy@qcd.lanl.gov
  13. (Tanmoy Bhattacharya) writes:
  14. > In article <DKtpIL.72z@eskimo.com>, scs@eskimo.com (Steve Summit) writes:
  15. >|>     typedef enum x enum_t;
  16. >|>     enum x {...};
  17. >
  18. > ANSI C forbids forward declaration of enums! The first reference to an enum
  19. > tag _must_ define the members of the enumeration.
  20.  
  21. Yipes!  Tanmoy's right.  This is different from the rule for
  22. struct and union tags, which is (of course) the rule I was
  23. thinking of.  [Lately I've been batting 0.000 on statements which
  24. I know I ought to verify before posting, but carelessly don't;
  25. let this be a lesson to you, kids.]
  26.  
  27.                     Steve Summit
  28.                     scs@eskimo.com
  29.